<!-- OrderDetail.vue -->
<template>
    <div class="order-detail">
      <h3>订单号：{{ order.id }}</h3>
      <p>下单时间：{{ order.time }}</p>
      <p>总金额：{{ order.totalAmount }}￥</p>
      <p>订单内容：</p>
      <ul>
        <li v-for="(item, index) in order.items" :key="index">
          {{ item.name }} - 数量：{{ item.quantity }} - 单价：{{ item.price }}￥
        </li>
      </ul>
    </div>
  </template>
  
  <script>
  export default {
    name: 'OrderDetail',
    props: {
      order: {
        type: Object,
        required: true
      }
    }
  };
  </script>